package control.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import control.mapper.usermanage.RoleMapper;
import control.module.po.authmanage.Role;
import control.service.IRoleService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 角色表 服务实现类
 * </p>
 *
 * @author cyj
 * @since 2020-10-20
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {

    @Override
    public Role getByName(String roleName) {
        Role condition = new Role().setRoleName(roleName);
        return this.baseMapper.selectOne(new QueryWrapper<Role>(condition));
    }

}
